#! /usr/bin/python

from random import randint

def gen(result, flags):
	if len(result) == len(flags):
		return
	while(True):
		i = randint(0, len(flags) - 1)
		if not flags[i]:
			flags[i] = True
			result.append(i)
			gen(result, flags)
			break

def main():
	flags = [0,]*256
	result = []
	gen(result, flags)
	for i in result:
		print i,

if __name__ == '__main__':
	main()

